<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all" />
    <link rel="stylesheet" href="__CSS__/admin.css"  media="all">
</head>
<body>
<table class="layui-table" lay-even="" lay-skin="row" lay-size="sm">
    <colgroup>
        <col width="40">
        <col width="70">
        <col width="200">
        <col width="70">
    </colgroup>
    <thead>
    <tr>
        <th>编号</th>
        <th>配置项</th>
        <th>具体</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name="setData" id="vo"}
    <tr style="height:100px;">
        <td>{$vo.id}</td>
        <td>{$vo.name}</td>
        <td>{$vo.id_data}</td>
        <td class="operation-menu">
            <a href="javascript:;" class="layui-btn layui-btn-xs setbtn" id="{$vo.id}" style="margin-right: 0;font-size:12px;">修改</a>
        </td>
    </tr>
    {/volist}
    </tbody>
</table>

<script src="__PUBLIC__/layui/layui.js" charset="utf-8"></script>
<script src="__PUBLIC__/jquery/jquery.min.js"></script>
<script>
    var message;
    layui.config({
        base: '__JS__/',
        version: '1.0.1'
    }).use(['app', 'message'], function() {
        var app = layui.app,
            $ = layui.jquery,
            layer = layui.layer;
        //将message设置为全局以便子页面调用
        message = layui.message;
        //主入口
        app.set({
            type: 'iframe'
        }).init();
    });
</script>

<script type="text/javascript">
    $('.setbtn').click(function(){
        var id = $(this).attr('id');
        var url = '';
        var title = '';
        var area = ['500px', '400px'];
        if(id=='1'){
            url = 'setSeason';
            title = "当季活动";
        }else if(id=='2'){
            url = 'setHot';
            title = "热门活动";
        }else{
            url = 'setArticle';
            title = "推荐攻略";
            area = ['800px', '600px'];
        }

        layer.open({
            title:title,
            type:2,
            content:[url],
            area: area,
            end:function(){
                location.reload();
            }
        });
    })
</script>

</body>
</html>
